package com.jintian.smart.kernel.core.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Builder.Default;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class OrgUnit implements Serializable {
    private static final long serialVersionUID = 1L;

    public enum OrgKind {
        USER("用户"), ROLE("角色"), POS("岗位"), ORG("部门");
        private final String desc;

        private OrgKind(String desc) {
            this.desc = desc;
        }

        public String getDesc() {
            return this.desc;
        }
    }

    private String id;
    private String code;
    private String name;
    private OrgKind kind;

    @Default
    private List<OrgUnit> includeUsers = new ArrayList<>();
}
